package com.winit.schedule.task.tracker.quartz.event;

import com.winit.schedule.core.event.AbstractEvent;
import com.winit.schedule.core.repository.constants.QuartzManagerType;
import com.winit.schedule.core.repository.entity.QuartzJobEntity;
import com.winit.schedule.core.repository.entity.QuartzLogEntity;
import com.winit.schedule.core.repository.entity.QuartzSchedulerEntity;
import com.winit.schedule.task.tracker.quartz.TriggerStatisticsInfo;

public class QuartzManagerEvent extends AbstractEvent<QuartzManagerType> {

    private QuartzJobEntity       jobEntity;

    private QuartzSchedulerEntity schedulerEntity;

    private TriggerStatisticsInfo statisticsInfo;

    private QuartzLogEntity       logEntity;

    public QuartzManagerEvent(QuartzManagerType type, QuartzLogEntity logEntity){
        super(type);
        this.logEntity = logEntity;
    }

    public QuartzManagerEvent(QuartzManagerType type, QuartzJobEntity jobEntity){
        super(type);
        this.jobEntity = jobEntity;
    }

    public QuartzManagerEvent(QuartzManagerType type, QuartzSchedulerEntity schedulerEntity){
        super(type);
        this.schedulerEntity = schedulerEntity;
    }

    public QuartzManagerEvent(QuartzManagerType type, TriggerStatisticsInfo statisticsInfo){
        super(type);
        this.statisticsInfo = statisticsInfo;
    }

    public QuartzJobEntity getJobEntity() {
        return jobEntity;
    }

    public void setJobEntity(QuartzJobEntity jobEntity) {
        this.jobEntity = jobEntity;
    }

    public QuartzSchedulerEntity getSchedulerEntity() {
        return schedulerEntity;
    }

    public void setSchedulerEntity(QuartzSchedulerEntity schedulerEntity) {
        this.schedulerEntity = schedulerEntity;
    }

    public TriggerStatisticsInfo getStatisticsInfo() {
        return statisticsInfo;
    }

    public QuartzLogEntity getLogEntity() {
        return logEntity;
    }

}
